import axios from 'axios'
import { Toast } from 'vant'
// 配置项目的根路径
const http = axios.create({
  baseURL: 'http://itfly.vip:8888'
  // baseURL: 'http://127.0.0.1:8888'
})

// 响应拦截
http.interceptors.response.use(response => {
  // console.log(response)
  return response
}, err => {
  Promise.reject(err.message)
  // console.log(err.response)
  Toast('请求失败...')
})

export default http